cat('\nCreating A13 \n\n')

dat = read.csv('TableA13_data.csv')


iv.reg = ivreg(white.obama.vote~dissimilarity+cbsa.percent.black+pct.black+kerry.pct.04+hhi_white_nonhisp+
              +Precinct.State | lenper+cbsa.percent.black+pct.black+kerry.pct.04+hhi_white_nonhisp+
              +Precinct.State,
            data = dat,
            weight = dat$total_population)


outtable = stargazer(iv.reg)

writeLines(
  outtable, 'TableA13.tex')